import { Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CommentModule } from 'lib/comment';
import { ProjectConstruction } from 'libs/db/entity/project-construction.entity';
import { ProjectConstructionController } from './project-construction.controller';
import { ProjectConstructionService } from './project-construction.service';

@Module({
    imports: [
        CommentModule,
        TypeOrmModule.forFeature([ProjectConstruction])
    ],
    controllers: [
        ProjectConstructionController
    ],
    providers: [
        ProjectConstructionService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        }
    ],
})
export class ProjectConstructionModule { }
